<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>晒宝详情页</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/page.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/media.js"></script>
    <script src="../js/common.js"></script>



    <style>
        .bd-0 {
            display: none;
        }

        .active {
            display: block;
        }

        .red-box {
            z-index: 9;
            width: 2.7rem;
            height: 1.89rem;
            background: #fff;
            border-radius: 6px;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            border-radius: 6px;
        }

        .red-box h2 {
            font-size: .16rem;
            color: rgba(18, 18, 18, 0.9);
            text-align: center;
            margin-top: .12rem;
            margin-bottom: .16rem;
        }

        .red-box ul {
            width: 2.09rem;
            display: block;
            margin: 0 auto;
            border-radius: 6px;
        }

        .red-box ul li {
            float: left;
            width: .68rem;
            line-height: .36rem;
            border: 1px solid rgba(18, 18, 18, 0.25);
            text-align: center;
            border-right: none;
            border-bottom: none;
        }

        .red-box ul li:nth-child(3n) {
            border-right: 1px solid rgba(18, 18, 18, 0.25);
        }

        .red-box ul li:nth-child(4),
        .red-box ul li:nth-child(5),
        .red-box ul li:nth-child(6) {
            border-bottom: 1px solid rgba(18, 18, 18, 0.25);
        }

        .red-box ul li img {
            width: .1rem;
            height: .12rem;
            margin-right: .03rem;
        }

        .red-box .button-wechart {
            border-radius: 6px;
            display: block;
            border: 1px solid rgba(0, 183, 0, 1);
            text-align: center;
            line-height: .3rem;
            width: .81rem;
            background: url('../img/微信支付 (1)@2x.png') no-repeat .12rem;
            background-size: .11rem .1rem;
            color: rgba(0, 183, 0, 1);
            font-size: .1rem;
            /*box-sizing: border-box;*/
            padding-left: .1rem;
            margin: 0.16rem auto 0;
        }

        .x {
            font-size: .1rem;
            color: rgba(18, 18, 18, 0.25);
            position: absolute;
            top: .11rem;
            right: .15rem;
        }
    </style>
</head>

<body>
    <!--头部-->
    <!-- <div class="public-header flex">
        <span class="public-header-left-back"></span>
        <span class="public-header-center">晒宝详情页</span>
        <span class="public-header-right"></span>
    </div> -->

    <!--正文-->
    <div class="Sunbird-details-page bc-gray" style="min-height:667px;">
        <h1>标题标题</h1>
        <p class="t1">
            <span>2017.07.02</span>
            <em>李某某</em>
        </p>
        <ul>
            <li>
                <img src="../img/配图@2x.png" alt="">
                <p class="des">文字文字文字</p>
            </li>
            <!-- <li>
                <img src="../img/配图@2x.png" alt="">
                <p class="des">文字文字文字</p>
            </li> -->
        </ul>
        <!-- <div class="box">
            <img src="../img/红包@2x.png" alt="">
            <p class="t2">123</p>
        </div>
        <p class="t3">已有123人打赏</p> -->
        <p class="t4">
            <span>阅读 <font>123</font></span>
            <em class="add_good">123</em>
            <i>投诉</i>
        </p>
        <span class="button" onclick='javascript:window.location.href="../page/publishment.html"'>我也来晒宝</span>
        <!-- <div class="section">
            <p class="t5">
                <span>评论<font>123</font></span>
                <em>只看作者</em>
            </p>
            <div class="img clearfix">
                <img src="../img/头像 @3x.png" alt="">
                <p class="t6">小仙女</p>
                <p class="t7">2楼 05.27 20:11</p>
            </div>
            <div class="t8">内容内容内容内容</div>
            <p class="t9">回复</p>
            <p class="t10">清风明月:内容内容内容</p>
            <p class="t11">作者:内容内容内容</p>
        </div>
        <div class="search">
            <form action="">
                <input type="text" placeholder="我来说一说">
                <button>发送</button>
            </form>
        </div> -->
    </div>

    <!-- <div class="red-box" style="display:none;">
        <h2>打赏金额</h2>
        <ul class='clearfix'>
            <li><img src="../img/红包@2x.png" alt="">2</li>
            <li><img src="../img/红包@2x.png" alt="">2</li>
            <li><img src="../img/红包@2x.png" alt="">2</li>
            <li><img src="../img/红包@2x.png" alt="">2</li>
            <li><img src="../img/红包@2x.png" alt="">2</li>
            <li><img src="../img/红包@2x.png" alt="">2</li>
        </ul>
        <span class="button-wechart">微信支付</span>
        <span class="x">X</span>
    </div> -->

    <!--灰色浮层-->
    <div class="mask" style="background: rgba(50,50,50,0.5);display:none;z-index:2;top:0.44rem;"></div>




    <script>
        $(function () {
       
           



            $('.hd a').click(function () {
                var index = $(this).index();
                $(this).addClass('active').siblings().removeClass('active');
                $('.bd-0').eq(index).addClass('active').siblings().removeClass('active');
            })
            let sharBioid = getQueryString('sharBioid');
            $.ajax({
                url: base_url + 'ZITAOHUI/sharebioMsg',
                data: {
                    sharBioid: sharBioid
                },
                success: function (data) {
                    console.log(data);
                    let all_data = data.extend.list;
                    // 转化时间戳
                    let time = new Date(all_data.add_time);
                    all_data.add_time = time.getFullYear() + '.' + time.getMonth() + '.' + time.getDate();
                    $('h1').html(all_data.discribe)
                    $('.t1 span').html(all_data.add_time)
                    $('.t1 em').html(all_data.user_nike_Name)
                    // $('.t1 em').html(all_data.addTime )
                    $('ul li img').attr('src', all_data.userUpImage);
                    $('.des').html(all_data.content)
                    $('.t4 span font').html(all_data.readingQuantity)
                    $('.t4 em').html(all_data.goodNum)
                    $('.t4 span font').html(all_data.reading_quantity)
                },
                error: function () {

                }
            })
            $.ajax({
                url: base_url + 'ZITAOHUI/ShareBioQuantity',
                data: {
                    sharebioId: sharBioid
                },
                success: function (data) {
                    console.log(data);
                },
                error: function () {

                }
            })

            $('.add_good').click(function () {
                $.ajax({
                    url:base_url+'ZITAOHUI/increaseShareBioGoodsNum',
                    data:{
                        sharBioid:sharBioid,
                        user_id:u_id
                    },
                    success:function(data){
                        console.log(data)
                        if(data.extend.list.msg == '点赞成功'){
                            $(this).html() += 1;
                        }else{
                            alert(data.extend.list.msg)
                        }

                    }
                })
            })




        })
    </script>
</body>

</html>